/**
 * Project Name:design-pattern <br/>
 * File Name:DuckTestDrive.java <br/>
 * Package Name:com.ftu.study.pattern.adapter <br/>
 */
package com.ftu.study.pattern.adapter;

/**
 * <p>  </p>
 * @version 1.0 2018年12月3日 mq 
 */
public class DuckTestDrive {
    public static void main(String[] args) {
        MallardDuck duck = new MallardDuck();
        WildTurkey turkey = new WildTurkey();
        
        Duck turkeyAdapter = new TurkeyAdapter(turkey);
        
        System.out.println("Turkey syas...");
        turkey.gobble();
        turkey.fly();
        
        System.out.println("The Duck syas...");
        testDuck(duck);
        
        System.out.println("The TurkeyAdapter syas...");
        testDuck(turkeyAdapter);
        
    }
    
    static void testDuck(Duck duck) {
        duck.quack();
        duck.fly();
    }
}
